<layout name="Common/layout" />

<link rel="stylesheet" href="__PUBLIC__/Home/style/home.css" type="text/css">
<link rel="stylesheet" href="__PUBLIC__/Home/style/order.css" type="text/css">
<script type="text/javascript" src="__PUBLIC__/Home/js/home.js"></script>

<include file="Common/nav" />

<!-- 页面主体 start -->
<div class="main w1210 bc mt10">
    <div class="crumb w1210">
        <h2><strong>我的定单 </strong><span>> 我的订单</span></h2>
    </div>

    <include file="My/menu" />

    <!-- 右侧内容区域 start -->
    <div class="content fl ml10">
        <div class="order_hd">
            <h3>我的订单</h3>
            <dl>
                <dt>便利提醒：</dt>
                <dd>待付款（<?php echo $data['noPayCount']; ?>）</dd>
            </dl>
        </div>

        <div class="order_bd mt10">
            <table class="orders">
                <thead>
                <tr>
                    <th width="10%">订单号</th>
                    <th width="20%">订单商品</th>
                    <th width="10%">收货人</th>
                    <th width="20%">订单金额</th>
                    <th width="20%">下单时间</th>
                    <th width="10%">订单状态</th>
                    <th width="10%">操作</th>
                </tr>
                </thead>
                <tbody>
                <?php foreach ($data['data'] as $k => $v): ?>
                <tr>
                    <td><?php echo $v['order_sn']; ?></td>
                    <td><a href=""><?php $_arr = explode(',', $v['logo']);foreach ($_arr as $k1 => $v1) showImage($v1);?></a></td>
                    <td><?php echo $v['shr_name']; ?></td>
                    <td>￥<?php echo $v['total_price']; ?></td>
                    <td><?php echo date('Y-m-d H:i:s', $v['addtime']); ?></td>
                    <td>
                        <?php if($v['order_status']=='正常'):?>
                            <?php if($v['pay_status'] == '是'): ?>
                                <?php if($v['post_status'] == 1):?>
                                已发货
                                <?php elseif($v['post_status'] == 2): ?>
                                已签收
                                <?php else:?>
                                未发货
                                <?php endif;?>
                            <?php else: ?>
                               <!-- <?php echo makeAlipayBtn($v['id']); ?>-->
                                未付款
                            <?php endif; ?>
                        <?php else:?>
                            关闭
                        <?php endif; ?>
                    </td>
                    <td>
                        <a href="<?php echo U('My/order_detail', array('order_id'=>$v['id']));?>">查看</a>
                        <?php if($v['post_status'] != 2 && $v['pay_status'] == '是'): ?>
                        | <a order-id="<?php echo $v['id'];?>" onclick="cancelOrder(this)" href="javascript:void(0);">取消订单</a>
                        <?php else:?>
                        <a order-id="<?php echo $v['id'];?>" onclick="delOrder(this)" href="javascript:void(0);">删除订单</a>
                        <?php endif; ?>
                    </td>
                </tr>
                <?php endforeach; ?>
                </tbody>
            </table>

            <p><?php echo $data['page']; ?></p>
        </div>
    </div>
    <!-- 右侧内容区域 end -->
</div>
<!-- 页面主体 end-->

<include file="Common/htlp" />